<%@ page import="ar.com.binarit.entities.Usuario" %>



<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'username', 'error')} ">
	<label for="username">
		<g:message code="usuario.username.label" default="Username" />
		
	</label>
	<g:textField name="username" maxlength="100" value="${usuarioInstance?.username}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'password', 'error')} ">
	<label for="password">
		<g:message code="usuario.password.label" default="Password" />
		
	</label>
	<g:textField name="password" value="${usuarioInstance?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'mail', 'error')} ">
	<label for="mail">
		<g:message code="usuario.mail.label" default="Mail" />
		
	</label>
	<g:field type="email" name="mail" maxlength="100" value="${usuarioInstance?.mail}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'tipoUsuario', 'error')} required">
	<label for="tipoUsuario">
		<g:message code="usuario.tipoUsuario.label" default="Tipo Usuario" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="tipoUsuario" name="tipoUsuario.id" from="${ar.com.binarit.entities.TipoUsuario.list()}" optionKey="id" required="" value="${usuarioInstance?.tipoUsuario?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'nickname', 'error')} ">
	<label for="nickname">
		<g:message code="usuario.nickname.label" default="Nickname" />
		
	</label>
	<g:textField name="nickname" maxlength="100" value="${usuarioInstance?.nickname}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'mubbiasFavoritas', 'error')} ">
	<label for="mubbiasFavoritas">
		<g:message code="usuario.mubbiasFavoritas.label" default="Mubbias Favoritas" />
		
	</label>
	<g:select name="mubbiasFavoritas" from="${ar.com.binarit.entities.Mubbia.list()}" multiple="multiple" optionKey="id" size="5" value="${usuarioInstance?.mubbiasFavoritas*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'mubbiasParticipando', 'error')} ">
	<label for="mubbiasParticipando">
		<g:message code="usuario.mubbiasParticipando.label" default="Mubbias Participando" />
		
	</label>
	<g:select name="mubbiasParticipando" from="${ar.com.binarit.entities.Mubbia.list()}" multiple="multiple" optionKey="id" size="5" value="${usuarioInstance?.mubbiasParticipando*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'imgAvatar', 'error')} ">
	<label for="imgAvatar">
		<g:message code="usuario.imgAvatar.label" default="Img Avatar" />
		
	</label>
	<g:textField name="imgAvatar" value="${usuarioInstance?.imgAvatar}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'mubbiasCreadas', 'error')} ">
	<label for="mubbiasCreadas">
		<g:message code="usuario.mubbiasCreadas.label" default="Mubbias Creadas" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${usuarioInstance?.mubbiasCreadas?}" var="m">
    <li><g:link controller="mubbia" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="mubbia" action="create" params="['usuario.id': usuarioInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'mubbia.label', default: 'Mubbia')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'valorRanking', 'error')} required">
	<label for="valorRanking">
		<g:message code="usuario.valorRanking.label" default="Valor Ranking" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="valorRanking" type="number" value="${usuarioInstance.valorRanking}" required=""/>
</div>

